REP1=1
REP2=2
running=False
while not running:
    rep = int(input("是否继续：输入1or2,1继续，2退出"))
    if rep==REP1:
        mode = int(input('请选择模式，1：三角形；2：平行四边形；3：圆'))
        mode1 = 1
        mode2 = 2
        mode3 = 3
        while not running:
            rep = int(input("是否继续：输入1or2,1继续，2退出"))
            if rep == REP1:
                if mode == mode1:
                    a1 = float(input('请输入边长1'))
                    b1 = float(input('请输入边长2'))
                    c1 = float(input('请输入边长3'))
                    p1 = (a1 + b1 + c1) / 2
                    s1 = (p1 * (p1 - a1) * (p1 - b1) * (p1 - c1)) ** 0.5
                    print(s1)
                elif mode == mode2:
                    a2 = float(input('请输入边长1'))
                    b2 = float(input('请输入边长2'))
                    c2 = float(input('请输入夹角'))
                    import math

                    C2 = math.radians(c2)
                    sin1 = math.sin(C2)
                    s2 = a2 * b2 * sin1
                    print(s2)
                elif mode == mode3:
                    r = float(input('请输入半径'))
                    import math

                    pi = math.pi
                    s3 = pi * pow(r, 2)
                    print(s3)
                else:
                    print('错误')
            elif rep == REP2:
                break


    elif rep==REP2:
        print("bye")
        exit()